package com.itrustsolution.rms.entities;
// Generated 25 Mei 11 22:19:57 by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * RmsModule generated by hbm2java
 */
@Entity
@Table(name="rms_module"
    ,catalog="rms"
)
public class RmsModule  implements java.io.Serializable {


     private Integer moduleId;
     private String moduleCode;
     private String moduleName;
     private String moduleInformation;
     private Set<RmsGroupModuleFunc> rmsGroupModuleFuncs = new HashSet(0);
     private Set<RmsModuleFunction> rmsModuleFunctions = new HashSet(0);

    public RmsModule() {
    }

	
    public RmsModule(String moduleCode, String moduleName) {
        this.moduleCode = moduleCode;
        this.moduleName = moduleName;
    }
    public RmsModule(String moduleCode, String moduleName, String moduleInformation, Set rmsGroupModuleFuncs, Set rmsModuleFunctions) {
       this.moduleCode = moduleCode;
       this.moduleName = moduleName;
       this.moduleInformation = moduleInformation;
       this.rmsGroupModuleFuncs = rmsGroupModuleFuncs;
       this.rmsModuleFunctions = rmsModuleFunctions;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="MODULE_ID", unique=true, nullable=false)
    public Integer getModuleId() {
        return this.moduleId;
    }
    
    public void setModuleId(Integer moduleId) {
        this.moduleId = moduleId;
    }
    
    @Column(name="MODULE_CODE", nullable=false, length=10)
    public String getModuleCode() {
        return this.moduleCode;
    }
    
    public void setModuleCode(String moduleCode) {
        this.moduleCode = moduleCode;
    }
    
    @Column(name="MODULE_NAME", nullable=false, length=50)
    public String getModuleName() {
        return this.moduleName;
    }
    
    public void setModuleName(String moduleName) {
        this.moduleName = moduleName;
    }
    
    @Column(name="MODULE_INFORMATION", length=100)
    public String getModuleInformation() {
        return this.moduleInformation;
    }
    
    public void setModuleInformation(String moduleInformation) {
        this.moduleInformation = moduleInformation;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="rmsModule")
    public Set<RmsGroupModuleFunc> getRmsGroupModuleFuncs() {
        return this.rmsGroupModuleFuncs;
    }
    
    public void setRmsGroupModuleFuncs(Set<RmsGroupModuleFunc> rmsGroupModuleFuncs) {
        this.rmsGroupModuleFuncs = rmsGroupModuleFuncs;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="rmsModule")
    public Set<RmsModuleFunction> getRmsModuleFunctions() {
        return this.rmsModuleFunctions;
    }
    
    public void setRmsModuleFunctions(Set<RmsModuleFunction> rmsModuleFunctions) {
        this.rmsModuleFunctions = rmsModuleFunctions;
    }




}


